
// 动态路由
export const dynamicRoutes = [
    {
        path: '/home',
        name: 'home',
        component: "home",
        meta: {
            title: '首页',
            icon: 'dashboard',
            isHide: false,
            isAffix: true,
            permissions: ['home'],
            isKeepAlive: true,
        },
    },
    /** 基础页面 */
    {
        path: '/page',
        name: 'page',
        component: 'page',
        meta: {
            title: '基础页面',
            icon: 'phone',
            isAffix: false,
            isHide: false,
            isKeepAlive: true,
        },
    },
    /** 组件 */
    {
        path: '/components',
        name: 'components',
        component: 'layout/Main/parentView',
        meta: {
            title: '组件',
            icon: 'phone',
            isAffix: false,
            permissions: ['components'],
            isHide: false,
            isKeepAlive: true,

        },
        children: [
            {
                path: '/components/previewImage',
                name: 'previewImage',
                meta: {
                    title: '预览图片',
                    icon: '',
                    isAffix: false,
                    permissions: ['previewImage'],
                    isHide: true,
                    isKeepAlive: true,
                },
                component: "components/preImage/index",
            },
            {
                path: '/components/uploadImages',
                name: 'uploadImages',
                meta: {
                    title: '上传图片',
                    icon: '',
                    isAffix: false,
                    permissions: ['previewImage'],
                    isHide: false,
                    isKeepAlive: true,
                },
                component: "components/uploadImages/index",
            }
        ]
    },
    // openLayers
    {
        path: '/openLayers',
        name: 'openLayers',
        component: 'layout/Main/parentView',
        meta: {
            title: 'openLayers',
            icon: 'phone',
            isHide: false,
            isKeepAlive: true,
        },
        children: [
            {
                path: '/openLayers/baseMap',
                name: 'openLayersBaseMap',
                meta: {
                    title: 'baseMap',
                    icon: '',
                    isHide: false,
                    isKeepAlive: true,
                },
                component: "openLayers/map/index",
            },
            {
                path: '/openLayers/marker',
                name: 'openLayersMarker',
                meta: {
                    title: 'marker',
                    icon: '',
                    isHide: false,
                    isKeepAlive: true,
                },
                component: "openLayers/marker/index",
            }
        ]
    },
    {
        path: '/multiLevel',
        name: 'multiLevel',
        component: 'layout/Main/parentView',
        meta: {
            title: '多级菜单',
            icon: '404',
            isAffix: false,
            isHide: false,
            isKeepAlive: true,
        },
        children: [
            {
                path: '/multiLevel/test1',
                name: 'test1',
                meta: {
                    title: 'test1',
                    icon: '',
                    isAffix: false,
                    // permissions: [],
                    isHide: false,
                    isKeepAlive: true,
                },
                component: 'layout/Main/parentView',
                children: [
                    {
                        path: '/multiLevel/test1/test3',
                        name: 'test3',
                        component: 'layout/Main/parentView',
                        redirect: "/multiLevel/test1/test3/test5",
                        meta: {
                            title: 'test3',
                            icon: '',
                            isAffix: false,
                            isHide: false,
                            isKeepAlive: true,
                        },
                        children: [
                            {
                                path: '/multiLevel/test1/test3/test5',
                                name: 'test5',
                                meta: {
                                    title: 'test5',
                                    icon: '',
                                    isAffix: false,
                                    isHide: false,
                                    isKeepAlive: true,
                                },
                                component: 'multiLevel/test5',
                            },
                            {
                                path: '/multiLevel/test1/test3/test6',
                                name: 'test6',
                                meta: {
                                    title: 'test6',
                                    icon: '',
                                    isAffix: false,
                                    isHide: false,
                                    isKeepAlive: true,
                                },
                                component: 'multiLevel/test6',
                            },
                        ]
                    },
                    {
                        path: '/multiLevel/test1/test4',
                        name: 'test4',
                        meta: {
                            title: 'test4',
                            icon: '',
                            isAffix: false,
                            isHide: false,
                            isKeepAlive: true,
                        },
                        component: 'multiLevel/test4',
                    },
                ]
            },
            {
                path: '/multiLevel/test2',
                name: 'test2',
                meta: {
                    title: 'test2',
                    icon: '',
                    isAffix: false,
                    isHide: false,
                    isKeepAlive: true,
                },
                component: 'multiLevel/test2',
            },
        ]
    },
]

// 静态路由
export const staticRoutes = [
    {
        path: '/login',
        name: 'login',
        component: () => import("@/views/login"),
        meta: {
            title: '登录',
        }
    },
    {
        path: '/404',
        name: 'notFound',
        component: () => import('@/views/error/404'),
        meta: {
            title: '找不到此页面',
            isHide: true,
        },
    },
    {
        path: '/401',
        name: 'noPower',
        component: () => import('@/views/error/401'),
        meta: {
            title: '没有权限',
            isHide: true,
        },
    },
]
